package com.example.nccdeploytool.entity;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author 15037
 * @description
 * @date 2025-05-29 10:34
 */
@Data
public class FileEntity {
    private String fileName;
    private String filePath;
    private String fileType;
    private Long fileSize;
    private Integer fileDepth;
    private String filePathRoot;
    private String filePathShow;
    private Date createdTime;
    private String updatedTime;
    private List<FileEntity> children = new ArrayList<FileEntity>();

    public String toString() {
        return fileName;
    }

    public String toJSONString() throws Exception {
        return new ObjectMapper().writeValueAsString(this);
    }

}
